from django.contrib import admin
from django.urls import path,include
from app.views import account,home,project,wiki,dashboard,issues,setting,statistics,file
urlpatterns = [
    # path('index/',account.index.as_view()),
    path('register/',account.register,name='register'),   #注册
    path('send/sms/',account.send_sms,name='app_send_sms'),
    path('login/sms/',account.login_sms,name='login_sms'),
    path('login/',account.login,name="login"),
    path('login/code/',account.login_code,name="login_code"),
    path('logout/',account.logout,name="logout"),
    path('index/',home.index,name="index"),

    #项目管理
    path('project/list/',project.project_list,name="project_list"),
    path('project/star/<str:type>/<str:id>',project.project_star,name="project_star"),
    path('project/unstar/<str:type>/<str:id>', project.project_unstar, name='project_unstar'),

    #项目概览
    path('manage/<int:id>/',include([
        path('wiki/', wiki.wiki, name='wiki'),
        path('wiki/add/',wiki.add,name='add_wiki'),
        path('wiki_catelog/',wiki.wiki_catelog,name='wiki_catelog'),
        path('wiki_delete/<int:wiki_id>',wiki.wiki_delete,name='wiki_delete'),
        path('wiki_edit/<int:wiki_id>',wiki.wiki_edit,name='wiki_edit'),
        path('wiki_upload/',wiki.wiki_upload,name='wiki_upload'),

        path('dashboard/',dashboard.dashboard,name='dashboard'),
        path('issues/',issues.issues,name='issues'),
        path('setting/',setting.setting,name='setting'),
        path('statistics/',statistics.statistics,name='statistics'),
        path('file/',file.file,name='file'),
    ],None)),
]
